export const TaskType = {
    OCR: 'ocr',
    OCR_LLM: 'ocr-llm',
} as const;

export interface SDKConfig {
    baseURL: string;
    apiKey: string;
    type?: typeof TaskType[keyof typeof TaskType];
    scenario?: string,
    debug?: boolean;
    logLevel?: string;
    timeout?: number;
    headers?: Record<string, string>;
}

export interface ApiResult<T> {
    code: number;
    msg: string;
    data: T;
}

export const TaskStatus = {
    PENDING: 'pending',
    PROCESSING: 'processing',
    COMPLETED: 'completed',
    FAILED: 'failed',
    NOT_FOUND: 'not_found',
} as const;


export interface OcrResult {
    texts: string[];
    img_ms: number;
    ocr_ms: number;
    status: typeof TaskStatus[keyof typeof TaskStatus];
    error: string;
}

export interface OcrLlmResult extends OcrResult {
    data: any[];
    llm_ms: number;
}